package main

import "fmt"

func main() {
	fn1 := testaaa()
	fmt.Println(fn1(2))
	fmt.Println(fn1(2))
}

func testaaa()  func(i int)  int{
	sum := 0
	return func(i int)  int {
		sum +=i
		return sum
	}
}